﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Runtime.Serialization;
using System.ServiceModel;
using System.Text;
using UbigeoService.Dominio;
using System.ServiceModel.Web;

namespace UbigeoService
{
    [ServiceContract]
    public interface IUbigeo
    {

        [OperationContract]
        [WebInvoke(Method = "GET", UriTemplate = "Ubigeo", ResponseFormat = WebMessageFormat.Json)]
        List<Departamento> ObtenerDepartamentos();

        [OperationContract]
        [WebInvoke(Method = "GET", UriTemplate = "Ubigeo/{departamento}", ResponseFormat = WebMessageFormat.Json)]
        List<Provincia> ObtenerProvincias(string departamento);

        [OperationContract]
        [WebInvoke(Method = "GET", UriTemplate = "Ubigeo/{departamento},{provincia}", ResponseFormat = WebMessageFormat.Json)]
        List<Distrito> ObtenerDistritos(string departamento, string provincia);
    }
}
